home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / lisp / stk-3.002 / stk-3 / STk-3.1 / Mp / fgmp-1.0b5 / notes < prev   
Encoding:
Text File  |  1993-12-09  |  3.5 KB  |  151 lines

  1. WELCOME TO FGMP.
  2.  
  3. FGMP is a public domain implementation of a subset of the GNU gmp library
  4. with the same API. 
  5.  
  6. For instance, you can link the following trivial program with either 
  7. this code, or libgmp.a and get the same results.
  8. ------------
  9. #include <stdio.h>
  10. #include "gmp.h"
  11. main()
  12. {
  13.     MP_INT a; MP_INT b; MP_INT c;
  14.  
  15.     mpz_init_set_ui(&a,1); mpz_init_set_ui(&b,2); mpz_init(&c);
  16.     mpz_add(&c,&a,&b);
  17.     printf("\n%s\n", mpz_get_str(NULL,10,&c));
  18. }
  19.  
  20. ------------
  21.  
  22. FGMP is really in the public domain. You can do whatever you want with
  23. it.
  24.  
  25. I wrote FGMP so that we would all have access to a (truly free)
  26. implementation of this subset of the API of GNU libgmp. I encourage
  27. everyone to distribute this as widely as possible.
  28.  
  29. If you need more documentation, I suggest you look at the file
  30. gmp.texi which is included with the GNU gmp library. 
  31.  
  32. You can send me bug reports, implementations of missing functions, flames
  33. and rants by Email. 
  34.  
  35. Any submissions of new code to be integrated into fgmp must also be 
  36. placed in the public domain (For the particularly dense, you can 
  37. release a new fgmp yourself under different licensing terms. This 
  38. is a condition for including a submission in a release of FGMP that 
  39. I personally prepare).
  40.  
  41. Mark Henderson <markh@wimsey.bc.ca>
  42.  
  43. ---
  44. This is the fifth BETA release. 1.0b5
  45.  
  46. I hearby place this file and all of FGMP in the public domain.
  47.  
  48. Thanks to Paul Rouse <par@r-cube.demon.co.uk> for changes to get fgmp 
  49. to work on a 286 MSDOS compiler, the functions mpz_sqrt and 
  50. mpz_sqrtrem, plus other general bug fixes. 
  51.  
  52. Thanks also to Erick Gallesio <eg@kaolin.unice.fr> for a fix
  53. to mpz_init_set_str
  54.  
  55. Define B64 if your "long" type is 64 bits. Otherwise we assume 32
  56. bit longs. (The 64 bit version hasn't been tested enough)
  57.  
  58.  
  59.  
  60. Platforms:
  61. Linux 0.99 (gcc)
  62. IBM RS6000/AIX 3.2 (IBM xlc compiler and gcc 2.3)
  63. Sun OS 4.1, Sun 3/4
  64. DEC Alpha OSF/1 (only lightly tested, 64 bit longs do make a difference,
  65.     thanks to DEC for providing access via axposf.pa.dec.com). Define B64
  66.     for this platform
  67. MSDOS 286 C compiler (see credits above)
  68.  
  69. ---
  70. Some differences between gmp and fgmp
  71.  
  72. 1. fgmp is considerably slower than gmp
  73. 2. fgmp does not implement the following:
  74.     all mpq_*
  75.     internal mpn_* functions
  76.     mpz_perfect_square_p
  77.     mpz_inp_raw, mpz_out_raw
  78.     mp_set_memory_functions, mpz_out_str, mpz_inp_str
  79. 3. fgmp implements the following in addition to the routines in GNU gmp.
  80.     int mpz_jacobi(MP_INT *a, MP_INT *b)
  81.     - finds the jacobi symbol (a/b)
  82. 4. mpz_sizeinbase often overestimates the exact value
  83.  
  84. 5. To convert your gmp based program to fgmp (subject to the
  85. above)
  86.  
  87. - recompile your source. Make sure to include the gmp.h file included
  88.   with fgmp rather than that included with gmp. (The point is to recompile
  89.   all files which include gmp.h)
  90. - link with gmp.o instead of libgmp.a
  91.  
  92. Here's a complete sorted list of function implemented in fgmp:
  93.  
  94. _mpz_realloc
  95. mpz_abs
  96. mpz_add
  97. mpz_add_ui
  98. mpz_and
  99. mpz_clear
  100. mpz_cmp
  101. mpz_cmp_si
  102. mpz_cmp_ui
  103. mpz_div
  104. mpz_div_2exp
  105. mpz_div_ui
  106. mpz_divmod
  107. mpz_divmod_ui
  108. mpz_fac_ui
  109. mpz_gcd
  110. mpz_gcdext
  111. mpz_get_si
  112. mpz_get_str
  113. mpz_get_ui
  114. mpz_init
  115. mpz_init_set
  116. mpz_init_set_si
  117. mpz_init_set_str
  118. mpz_init_set_ui
  119. mpz_jacobi
  120. mpz_mdiv
  121. mpz_mdiv_ui
  122. mpz_mdivmod
  123. mpz_mdivmod_ui
  124. mpz_mmod
  125. mpz_mmod_ui
  126. mpz_mod
  127. mpz_mod_2exp
  128. mpz_mod_ui
  129. mpz_mul
  130. mpz_mul_2exp
  131. mpz_mul_ui
  132. mpz_neg
  133. mpz_or
  134. mpz_pow_ui
  135. mpz_powm
  136. mpz_powm_ui
  137. mpz_probab_prime_p
  138. mpz_random
  139. mpz_random2
  140. mpz_set
  141. mpz_set_si
  142. mpz_set_str
  143. mpz_set_ui
  144. mpz_size
  145. mpz_sizeinbase
  146. mpz_sqrt
  147. mpz_sqrtrem
  148. mpz_sub
  149. mpz_sub_ui
  150. mpz_xor
  151.